package servlet;

import java.io.IOException;
import java.util.Vector;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import DAO.CourseDao;
import DTO.Course;

public class AllCourseServlet extends HttpServlet {
	
	protected void doGet(HttpServletRequest req, HttpServletResponse resp)
			throws ServletException, IOException {
    	    CourseDao sd=new CourseDao();
   	        Vector<Course> v =sd.fineAllCourse();
        	HttpSession s=req.getSession();
        	s.setAttribute("allCourse", v);
   	        //���ص�student.jspҳ�沢��ʾ���ҵ������û���Ϣ
        	 resp.sendRedirect(req.getContextPath()+"/admin/allcourse.jsp");	
	}
}
